var num=0;
setInterval ( function () {

  
   if(num>=8){
    num=0;
}
    let k1 =document.getElementById("k1");
    let k2 =document.getElementById("k2");
    let k3 =document.getElementById("k3");
    let k4 =document.getElementById("k4");

   let arr = document.getElementById("yu");
if(num==0||num==1){
    k1.style.border = "5px solid #76cee7";
    k2.style.border = "5px solid black";
    k3.style.border = "5px solid black";
    k4.style.border = "5px solid black";
    arr.style.backgroundImage="url('https://gitee.com/yu-ji-yao/tupian/raw/master/img/QQ图片20220212172903.png')"
}
else if(num==2||num==3){
    arr.style.backgroundImage = "url('https://gitee.com/yu-ji-yao/tupian/raw/master/img/QQ图片20220212173245.png')"
    k2.style.border = "5px solid #76cee7";
    k1.style.border = "5px solid black";
    k3.style.border = "5px solid black";
    k4.style.border = "5px solid black";
}
else if (num == 4||num==5){
    arr.style.backgroundImage ="url('https://gitee.com/yu-ji-yao/tupian/raw/master/img/QQ图片20220212173459.png')"
    k3.style.border = "5px solid #76cee7";
    k2.style.border = "5px solid black";
    k1.style.border = "5px solid black";
    k4.style.border = "5px solid black";
}
else if(num ==6||num==7){
    arr.style.backgroundImage = "url('https://gitee.com/yu-ji-yao/tupian/raw/master/img/QQ图片20220212173532.png')"
    k4.style.border = "5px solid #76cee7";
    k2.style.border = "5px solid black";
    k3.style.border = "5px solid black";
    k1.style.border = "5px solid black";
}
num++;
},1000)

function detailleft(){
    if(num>=2){
        num=num-2;
    }
    else if(num ==0||num==1){
        num =6;
    }
}
function detailright(){
    if(num<6){
        num=num+2;
    }
    else if(num ==6||num==7){
        num =0;
    }
}
function k1(){
    num=0;
}
function k2(){
    num=2;
}
function k3(){
    num=4;
}
function k4(){
    num=6;
}